package com.luom.fsp.constant;

/**
 * redis常量
 *
*/
public interface RedisConstant {

    // 登录相关
    String LOGIN_USER_KEY = "user:login:";
    Long LOGIN_USER_TTL = 30L;

    // 销量相关
    // 商品规格销量
    String SKU_SALES_STATISTIC_KEY = "sku:sales:";
    Long SKU_SALES_STATISTIC_TTL = 60 *  24 * 2L;

    // 商品销量
    String PRODUCT_SALES_STATISTIC_KEY = "product:sales";
    Long PRODUCT_SALES_STATISTIC_TTL = 60 *  24 * 2L;

    // 商品规格库存
    String SKU_STOCK_STATISTIC_KEY = "sku:stock:";

    // 推送仪表盘数据
    String DASHBOARD_KEY = "dashboard";

    // 推送订单量图表
    String REDIS_DAILY_ORDERS_KEY = "orderStats:daily:";
    Long REDIS_DAILY_ORDERS_TTL = 24L;

    // 秒杀优惠券库存
    String SECKILL_COUPON_STOCK_KEY = "seckill:coupon:stock:";
    Long SECKILL_COUPON_STOCK_TTL = 60 * 60 * 24 * 7L;

    // 购买优惠券分布式锁
    String SECKILL_COUPON_LOCK_KEY = "seckill:coupon:lock:";

    //订单超时自动取消
    String ORDER_TIMEOUT_KEY = "order:timeout:";
}
